
// To implement a 2d tranformation on any object 


#ifndef OBJECT2DTRANSFORMATION_H
#define OBJECT2DTRANSFORMATION_H

#include "Matrix.h"
#include <math.h>



class Object2DTransformation : public Matrix{

public:
   Matrix * transformedObject; 
   //Matrix * transformedBy;
   
public:   
   Object2DTransformation(const char *fileName);   
   Object2DTransformation(const Object2DTransformation & another);
   Object2DTransformation(long numRows ,long numCols,double val=0); 
   Object2DTransformation(); 
   
   ~Object2DTransformation();
   

  //  void setTransformedByMatrix(const Matrix & T);   
    
    
   // Tranformation of object thru x-axis and y-axis
    bool transform(const Matrix & T);
    
   Matrix transform(const double dx = 0, const double dy = 0 );   
    
    
   // Rotation of object thru x and y axis
    bool rotate(const double angle);
    
   // Scaling of object thru x and y axis
    bool scale(const Matrix & A); // incomplete
    
    bool scale(const double dx, const double dy = 1);
    
    
   // Shearing of object thru x and y axis
    bool sheare(const Matrix & A);   // incomplete 
    
    bool sheare(const double dx ,const double dy = 0);
    
   // save transformed object into file
    bool save(const char *fileName);   
    
   //return transformed object 
    Matrix getTransformedObject(); 
   
};

#endif     // end of OBJECT2DTRANSFORMATION_H
